// import { ajaxAsync } from 'vue-xiaobu-utils'
import LineInfoModel from '../nearbysite/model/LineInfoModel'
import { getColletctedRouteList } from '../nearbysite/CollectionUtils'

async function getColletctedList() {
  let list = await getColletctedRouteList()
  let lineList = []
  list.map(item => {
    let lineItem = new LineInfoModel(
      item.SUBROUTE_ID,
      item.SUBROUTE_NAME,
      item.TYPE,
      item.BUS_START_STATION,
      item.BUS_END_STATION,
      0,
      '',
      item.START_TIME,
      item.END_TIME,
      item.PRICE,
      true
    )
    lineList.push(lineItem)
  })
  return lineList
}

export { getColletctedList }
